<?php
class SupplierEntity extends SupplierEntityBase
{
	public function __construct($arrValue = null, $prefix = '')
	{
		if(!is_null($arrValue) && is_array($arrValue)){
			parent::__construct($arrValue, $prefix);
		}
	}

	public function getAuthorName()
	{
		$str = "";
		$usersDataService = new UsersDataService();
		if($this->ownerId != "")
		{
			$userItem = $usersDataService->getById($this->ownerId);
			$str = $userItem->username;
		}

		return $str;
	}
	
	public function getThumb()
	{
		return Zend_Registry::get('config')->APPLICATION_URL . '/Resources/Thumbnails/' . $this->logo;
	}

	public function getImage()
	{
		return Zend_Registry::get('config')->APPLICATION_URL . '/Resources/Images/' . $this->logo;
	}
}